package com.codeest.geeknews.model.http.api;

import com.codeest.geeknews.model.bean.DoubanChannelBean;
import com.codeest.geeknews.model.bean.DoubanLyricBean;
import com.codeest.geeknews.model.bean.DoubanPlaylistBean;

import io.reactivex.Flowable;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * https://github.com/zonyitoo/doubanfm-qt/wiki/%E8%B1%86%E7%93%A3FM-API
 * Created by admin on 2017/8/22.
 */

public interface DoubanV2Apis {


    String HOST = "https://api.douban.com/v2/fm/";


    /**
     * 获取频道列表
     * 比如 单曲, 风格流派, 语言年代
     */
    @GET("app_channels")
    Flowable<DoubanChannelBean> getChannels(
            @Query("alt") String alt,
            @Query("app_name") String app_name,
            @Query("apikey") String apikey,
            @Query("client") String client,
            @Query("client_id") String client_id,
            @Query("icon_cate") String icon_cate,
            @Query("udid") String udid,
            @Query("douban_udid") String douban_udid,
            @Query("version") String version
    );

    /**
     * 歌曲列表
     * 比如 单曲, 风格流派, 语言年代
     */
    @GET("playlist")
    Flowable<DoubanPlaylistBean> getPlaylist(
            //@Header("Authorization") String header,
            @Query("channel") String channel,
            @Query("from") String from,
            @Query("pt") String pt,
            @Query("kbps") int kbps,
            @Query("formats") String formats,
            @Query("alt") String alt,
            @Query("app_name") String app_name,
            @Query("apikey") String apikey,
            @Query("client") String client,
            @Query("client_id") String client_id,
            @Query("icon_cate") String icon_cate,
            @Query("udid") String udid,
            @Query("douban_udid") String douban_udid,
            @Query("version") String version,
            @Query("type") String type
    );

    @GET("lyric")
    Flowable<DoubanLyricBean> getLyric(
            @Query("sid") int sid,
            @Query("ssid") String ssid
    );
}
